package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.HotelDetail;
import cn.wolfcode.trip.base.service.IHotelDetailService;
import cn.wolfcode.trip.base.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther: Killua
 * @Date: 2018/10/13 20:14
 * @Description:
 */
@RestController
@RequestMapping("hotelDetails")
public class HotelDetailController {
    @Autowired
    private IHotelDetailService hotelDetailService;
    @GetMapping("/{hotelId}")
    public JsonResult hotelListRoom(@PathVariable Long hotelId){
        JsonResult jsonResult = new JsonResult();
        List<HotelDetail> list = hotelDetailService.queryHotelRoomDetailByHotelId(hotelId);
        jsonResult.setResult(list);
        return jsonResult;
    }
}
